package com.easy.demo.mapper;

import com.easy.demo.entity.User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;


import java.util.List;
@Repository("")
@Mapper
public interface UserMapper {

//    @Select("select*from user")
    public List<User> ListUser();

//    @Select("select * from user where id = #{id}")
    public User selectUserById(int id);

//    @Select("select * from user where name = #{name}")
    public List<User> selectUserByName(String name);

//    @Insert("insert into user(name,password,number) values (#{name},#{password},#{number})")
    public void addUser(User user);

//    @Update("update user set name=#{name},password=#{password},number=#{number} where id=#{id}")
    public void updateUser(User user);

//    @Delete("delete from user where id=#{id}")
    public void deleteUser(int id);

}

